package com.itc.bpm.mapper;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itc.bpm.bean.BpmProcessDefinitionExt;

import java.util.Collection;
import java.util.List;

public interface BpmProcessDefinitionExtMapper extends BaseMapper<BpmProcessDefinitionExt> {

    default List<BpmProcessDefinitionExt> selectListByProcessDefinitionIds(Collection<String> processDefinitionIds) {
        return selectList(new LambdaQueryWrapper<BpmProcessDefinitionExt>().in(BpmProcessDefinitionExt::getProcessDefinitionId,processDefinitionIds));
    }

    default BpmProcessDefinitionExt selectByProcessDefinitionId(String processDefinitionId) {
        return selectOne(new LambdaQueryWrapper<BpmProcessDefinitionExt>().eq(BpmProcessDefinitionExt::getProcessDefinitionId,processDefinitionId));// selectOne("process_definition_id", processDefinitionId);
    }

}
